<template>
    <div class="empty-wrap">
        <van-image :src="blankImage"/>
        <p class="text">{{message}}</p>
        <van-button class="button" color="#27BA9B" type="primary" :to="url" v-if="url">{{ buttonText }}</van-button>
    </div>
</template>

<script lang="ts" setup>
import blankImage from '@/assets/images/blank.png'

withDefaults(defineProps<{
    message?: string
    url?: string
    buttonText?: ''
}>(), {
    message: '暂无数据',
    buttonText: '',
    url: ''
})
</script>

<style scoped lang="scss">
.empty-wrap {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 100px;
    .text {
        margin-top: 10px;
        font-size: 14px;
        color: #bcbaba;
    }
    .button {
        margin-top: 20px;
    }
}
</style>